package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.SpendClassify;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface SpendClassifyMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SpendClassify record);

    SpendClassify selectByPrimaryKey(Long id);

    List<SpendClassify> selectAll();

    int updateByPrimaryKey(SpendClassify record);

    List<SpendClassify> selectRootClassify();

    //查询子分类
    List<SpendClassify> selectChildrenSpendClaaify(Long parent_id);


    void saveSpendParent(String text);

    void saveSpendChildren(@Param("text") String text,
                           @Param("parentId")Long id);
}